/**
 *	---------------------------------------------------------------------------
 *	COMP 6231/FALL 2013
 *	Assignment - 02
 *	@author Talha Rahman (1296884)
 *	---------------------------------------------------------------------------
 *	Records of type Missing Record. 
 *	  
 */
package ca.concordia.comp6231.record;

public class MissingRecord extends Record {
	private final int REQUIRED_NO_OF_ARGS = 8;
	
	private String description;
	private String address;
	private String lastDate;
	private String lastLocation;
	
	private final String recordType = "MR";
	
	public MissingRecord(String...args){
		if(args.length < REQUIRED_NO_OF_ARGS){
			throw new IllegalArgumentException("A minimum of :" + REQUIRED_NO_OF_ARGS + 
												" has to be supplied when creating a " + 
												this.getClass().getSimpleName());
		}else{
			this.setRecordID		(args[0]);
			this.setFirstName		(args[1]);
			this.setLastName		(args[2]);
			this.setDescription		(args[3]);
			this.setAddress			(args[4]);
			this.setLastDate		(args[5]);
			this.setLastLocation	(args[6]);
			this.setStatus			(args[7]);
		}
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getLastDate() {
		return lastDate;
	}
	public void setLastDate(String lastDate) {
		this.lastDate = lastDate;
	}
	public String getLastLocation() {
		return lastLocation;
	}
	public void setLastLocation(String lastLocation) {
		this.lastLocation = lastLocation;
	}
	public String getRecordType() {
		return recordType;
	}
	
	@Override
	public String toString(){
		return "{"
				+ "Record ID: " + this.getRecordID() + ","
				+ "First Name: " + this.getFirstName() + ","
				+ "Last Name: " + this.getLastName() + ","
				+ "Status: " + this.getStatus() + ","
				+ "Description: " + this.getDescription() + ","
				+ "Address: " + this.getAddress() + ","
				+ "Last Date: " + this.getLastDate() + ","
				+ "Last Location: " + this.getLastLocation() +
				"}";
	}
}
